package com.feather.common.data.simple;

import com.feather.common.data.Column;
import com.feather.common.data.MetaAdapter;

/**
 * @author flogyin
 */
public class SimpleColumn extends MetaAdapter implements Column, java.io.Serializable {
	private static final long	serialVersionUID	= 1L;

	protected short				type;
	protected int				dataType;
	protected String			dataTypeName;
	protected int				ordinal;

	protected String			remarks;

	protected boolean			nullable;
	protected int				length;
	protected String			def;
	protected int				precision;
	protected short				scale;
	protected short				radix;

	@Override
	public short getType() {
		return this.type;
	}

	@Override
	public void setType(short type) {
		this.type = type;
	}

	@Override
	public int getDataType() {
		return this.dataType;
	}

	@Override
	public void setDataType(int dataType) {
		this.dataType = dataType;
	}

	@Override
	public String getDataTypeName() {
		return this.dataTypeName;
	}

	@Override
	public void setDataTypeName(String dataTypeName) {
		this.dataTypeName = dataTypeName;
	}

	@Override
	public int getOrdinal() {
		return this.ordinal;
	}

	@Override
	public void setOrdinal(int ordinal) {
		this.ordinal = ordinal;
	}

	@Override
	public String getRemarks() {
		return this.remarks;
	}

	@Override
	public void setRemarks(String remarks) {
		this.remarks = remarks;
	}

	@Override
	public boolean isNullable() {
		return this.nullable;
	}

	@Override
	public void setNullable(boolean nullable) {
		this.nullable = nullable;
	}

	@Override
	public int getLength() {
		return this.length;
	}

	@Override
	public void setLength(int length) {
		this.length = length;
	}

	@Override
	public String getDefault() {
		return this.def;
	}

	@Override
	public void setDefault(String def) {
		this.def = def;
	}

	@Override
	public int getPrecision() {
		return this.precision;
	}

	@Override
	public void setPrecision(int precision) {
		this.precision = precision;
	}

	@Override
	public short getScale() {
		return this.scale;
	}

	@Override
	public void setScale(short scale) {
		this.scale = scale;
	}

	@Override
	public short getRadix() {
		return this.radix;
	}

	@Override
	public void setRadix(short radix) {
		this.radix = radix;
	}

	@Override
	public Column copy() {
		SimpleColumn copy = new SimpleColumn();
		copy.original = super.original;
		copy.catalog = super.catalog;
		copy.schema = super.schema;
		copy.name = super.name;

		copy.type = this.type;
		copy.dataType = this.dataType;
		copy.dataTypeName = this.dataTypeName;
		copy.ordinal = this.ordinal;

		copy.remarks = this.remarks;

		copy.nullable = this.nullable;
		copy.length = this.length;
		copy.def = this.def;
		copy.precision = this.precision;
		copy.scale = this.scale;
		copy.radix = this.radix;
		return copy;
	}
}
